/ MacTech 1 to 12
/ MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 12 - 1996 / 12.04 Apr 96 / ThreadingAppleEvents.sit / ThreadingAppleEvents / Grant's CGI Code 1.0b13 / test.script ![]() | < prev |
MacBinary | 1995-12-17 | 2.0 KB | [TEXT/ToyS] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, Sun Dec 17 13:32:23 1995, modified Sun Dec 17 13:32:23 1995, creator 'ToyS', type ASCII, 1182 bytes "test.script" , at 0x51e 622 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [ToyS] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 74 65 73 74 2e 73 | 63 72 69 70 74 00 00 00 |..test.s|cript...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 54 6f 79 | 53 00 00 00 00 00 00 00 |.TEXTToy|S.......|
|00000050| 00 00 00 00 00 04 9e 00 | 00 02 6e ac fa 12 b7 ac |........|..n.....|
|00000060| fa 12 b7 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 be 88 00 00 |........|........|
|00000080| 73 65 74 20 43 47 49 52 | 65 73 75 6c 74 20 74 6f |set CGIR|esult to|
|00000090| 20 22 22 0d 73 65 74 20 | 4c 69 73 74 53 54 41 52 | "".set |ListSTAR|
|000000a0| 52 65 73 75 6c 74 20 74 | 6f 20 39 39 0d 0d 2d 2d |Result t|o 99..--|
|000000b0| 20 69 74 27 73 20 75 73 | 65 66 75 6c 2c 20 69 66 | it's us|eful, if|
|000000c0| 20 74 68 65 20 63 67 69 | 20 74 61 6b 65 73 20 61 | the cgi| takes a|
|000000d0| 20 6c 6f 6e 67 20 74 69 | 6d 65 20 74 6f 20 70 72 | long ti|me to pr|
|000000e0| 6f 63 65 73 73 2c 20 6f | 72 20 69 66 20 79 6f 75 |ocess, o|r if you|
|000000f0| 20 77 61 6e 74 20 74 6f | 20 73 6c 6f 77 6c 79 20 | want to| slowly |
|00000100| 73 74 65 70 20 74 68 72 | 6f 75 67 68 0d 2d 2d 20 |step thr|ough.-- |
|00000110| 74 68 65 20 63 6f 64 65 | 2c 20 74 6f 20 73 65 74 |the code|, to set|
|00000120| 20 74 68 65 20 74 69 6d | 6f 75 74 20 76 61 6c 75 | the tim|out valu|
|00000130| 65 20 76 65 72 79 20 68 | 69 67 68 20 73 6f 20 74 |e very h|igh so t|
|00000140| 68 61 74 20 79 6f 75 20 | 64 6f 6e 27 74 20 68 61 |hat you |don't ha|
|00000150| 76 65 20 74 6f 20 77 6f | 72 72 79 20 61 62 6f 75 |ve to wo|rry abou|
|00000160| 74 20 74 68 65 0d 2d 2d | 20 74 65 73 74 2e 73 63 |t the.--| test.sc|
|00000170| 72 69 70 74 20 74 69 6d | 69 6e 67 20 6f 75 74 20 |ript tim|ing out |
|00000180| 62 65 66 6f 72 65 20 79 | 6f 75 20 72 65 74 75 72 |before y|ou retur|
|00000190| 6e 20 61 20 72 65 73 75 | 6c 74 20 66 72 6f 6d 20 |n a resu|lt from |
|000001a0| 79 6f 75 72 20 63 67 69 | 2e 0d 77 69 74 68 20 74 |your cgi|..with t|
|000001b0| 69 6d 65 6f 75 74 20 6f | 66 20 39 39 39 39 39 20 |imeout o|f 99999 |
|000001c0| 73 65 63 6f 6e 64 73 0d | 09 0d 09 74 65 6c 6c 20 |seconds.|...tell |
|000001d0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 22 63 67 69 |applicat|ion "cgi|
|000001e0| 2e 61 63 67 69 22 0d 09 | 09 73 65 74 20 43 47 49 |.acgi"..|.set CGI|
|000001f0| 52 65 73 75 6c 74 20 74 | 6f 20 43 47 49 20 22 70 |Result t|o CGI "p|
|00000200| 61 74 68 22 20 6d 65 74 | 68 6f 64 20 22 50 4f 53 |ath" met|hod "POS|
|00000210| 54 22 20 73 65 61 72 63 | 68 20 22 73 65 61 72 63 |T" searc|h "searc|
|00000220| 68 2b 68 65 72 65 22 20 | 70 6f 73 74 20 c2 0d 09 |h+here" |post ...|
|00000230| 09 09 22 46 69 65 6c 64 | 31 3d 53 6f 6d 65 2b 74 |.."Field|1=Some+t|
|00000240| 65 78 74 26 66 69 65 6c | 64 2b 32 3d 25 38 30 74 |ext&fiel|d+2=%80t|
|00000250| 68 61 74 27 73 2b 70 65 | 72 63 65 6e 74 2b 38 30 |hat's+pe|rcent+80|
|00000260| 22 20 63 6c 69 65 6e 74 | 20 61 64 64 72 65 73 73 |" client| address|
|00000270| 20 c2 0d 09 09 09 22 67 | 72 61 6e 74 2e 6d 61 63 | ....."g|rant.mac|
|00000280| 2e 68 6f 6d 65 22 20 75 | 73 65 72 6d 61 69 6c 20 |.home" u|sermail |
|00000290| 22 67 72 61 6e 74 40 61 | 63 6d 2e 6f 72 67 22 20 |"grant@a|cm.org" |
|000002a0| 75 73 65 72 6e 61 6d 65 | 20 22 47 52 41 4e 54 22 |username| "GRANT"|
|000002b0| 20 70 61 73 73 77 6f 72 | 64 20 c2 0d 09 09 09 22 | passwor|d ....."|
|000002c0| 54 45 53 54 22 20 73 65 | 72 76 65 72 20 61 64 64 |TEST" se|rver add|
|000002d0| 72 65 73 73 20 22 31 39 | 32 2e 30 2e 31 2e 32 22 |ress "19|2.0.1.2"|
|000002e0| 20 73 65 72 76 65 72 20 | 70 6f 72 74 20 22 38 30 | server |port "80|
|000002f0| 22 20 73 63 72 69 70 74 | 20 6e 61 6d 65 20 22 22 |" script| name ""|
|00000300| 20 72 65 66 65 72 65 72 | 20 c2 0d 09 09 09 22 68 | referer| ....."h|
|00000310| 74 74 70 3a 2f 2f 61 72 | 70 70 31 2e 63 61 72 6c |ttp://ar|pp1.carl|
|00000320| 65 74 6f 6e 2e 63 61 2f | 67 72 61 6e 74 2f 22 20 |eton.ca/|grant/" |
|00000330| 75 73 65 72 20 61 67 65 | 6e 74 20 22 41 70 70 6c |user age|nt "Appl|
|00000340| 65 53 63 72 69 70 74 22 | 20 63 6f 6e 74 65 6e 74 |eScript"| content|
|00000350| 20 74 79 70 65 20 c2 0d | 09 09 09 22 74 65 78 74 | type ..|..."text|
|00000360| 2f 70 6c 61 69 6e 22 20 | 61 63 74 69 6f 6e 20 6e |/plain" |action n|
|00000370| 61 6d 65 20 22 54 45 53 | 54 22 20 61 63 74 69 6f |ame "TES|T" actio|
|00000380| 6e 20 70 61 74 68 20 22 | 22 20 63 6c 69 65 6e 74 |n path "|" client|
|00000390| 20 49 50 20 22 31 39 32 | 2e 30 2e 31 2e 32 22 20 | IP "192|.0.1.2" |
|000003a0| 66 75 6c 6c 20 72 65 71 | 75 65 73 74 20 c2 0d 09 |full req|uest ...|
|000003b0| 09 09 22 22 20 63 6f 6e | 6e 65 63 74 69 6f 6e 20 |.."" con|nection |
|000003c0| 31 39 39 37 20 2d 2d 20 | 53 74 61 72 20 57 61 72 |1997 -- |Star War|
|000003d0| 73 27 20 32 30 74 68 20 | 61 6e 6e 69 76 65 72 73 |s' 20th |annivers|
|000003e0| 61 72 79 0d 09 09 0d 09 | 09 73 65 74 20 4c 69 73 |ary.....|.set Lis|
|000003f0| 74 53 54 41 52 52 65 73 | 75 6c 74 20 74 6f 20 4c |tSTARRes|ult to L|
|00000400| 69 73 74 53 54 41 52 45 | 76 65 6e 74 20 22 4d 79 |istSTARE|vent "My|
|00000410| 53 65 72 76 69 63 65 22 | 20 73 65 6e 64 65 72 20 |Service"| sender |
|00000420| 22 54 65 73 74 20 55 73 | 65 72 22 20 65 6d 61 69 |"Test Us|er" emai|
|00000430| 6c 20 c2 0d 09 09 09 22 | 75 73 65 72 40 6d 61 69 |l ....."|user@mai|
|00000440| 6c 2e 74 65 73 74 22 20 | 73 75 62 6a 65 63 74 20 |l.test" |subject |
|00000450| 22 54 65 73 74 20 4d 65 | 73 73 61 67 65 22 20 72 |"Test Me|ssage" r|
|00000460| 65 67 65 78 70 20 22 74 | 65 73 74 20 72 65 67 65 |egexp "t|est rege|
|00000470| 78 65 70 22 20 66 69 6c | 65 6e 61 6d 65 20 c2 0d |xep" fil|ename ..|
|00000480| 09 09 09 22 74 65 73 74 | 2e 6d 73 67 22 20 6d 61 |..."test|.msg" ma|
|00000490| 69 6c 63 65 6e 74 65 72 | 20 22 22 20 6d 63 7a 6f |ilcenter| "" mczo|
|000004a0| 6e 65 20 22 22 20 6d 63 | 65 6d 61 69 6c 20 22 22 |ne "" mc|email ""|
|000004b0| 0d 09 65 6e 64 20 74 65 | 6c 6c 0d 09 0d 65 6e 64 |..end te|ll...end|
|000004c0| 20 74 69 6d 65 6f 75 74 | 0d 0d 72 65 74 75 72 6e | timeout|..return|
|000004d0| 20 43 47 49 52 65 73 75 | 6c 74 20 26 20 72 65 74 | CGIResu|lt & ret|
|000004e0| 75 72 6e 20 26 20 72 65 | 74 75 72 6e 20 26 20 22 |urn & re|turn & "|
|000004f0| 4c 69 73 74 53 54 41 52 | 20 52 65 73 75 6c 74 3a |ListSTAR| Result:|
|00000500| 20 22 20 26 20 28 4c 69 | 73 74 53 54 41 52 52 65 | " & (Li|stSTARRe|
|00000510| 73 75 6c 74 20 61 73 20 | 74 65 78 74 29 0d 00 00 |sult as |text)...|
|00000520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 01 00 00 00 02 14 | 00 00 01 14 00 00 00 5a |........|.......Z|
|00000590| 41 45 47 65 74 50 61 72 | 61 6d 53 74 72 69 6e 67 |AEGetPar|amString|
|000005a0| 3a 20 74 65 6d 70 42 75 | 20 66 b2 65 72 20 70 74 |: tempBu| f.er pt|
|000005b0| 0b 74 65 73 74 2e 73 63 | 72 69 70 74 02 00 00 00 |.test.sc|ript....|
|000005c0| 54 45 58 54 54 6f 79 53 | 00 00 00 00 00 00 00 00 |TEXTToyS|........|
|000005d0| 00 00 54 45 58 54 54 6f | 79 53 00 00 00 00 00 00 |..TEXTTo|yS......|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 ac 25 c4 e7 00 00 | 00 00 00 00 02 6e 53 69 |...%....|.....nSi|
|00000600| 7a 65 20 69 73 20 6e 69 | 6c 00 24 41 45 47 65 74 |ze is ni|l.$AEGet|
|00000610| 50 61 72 61 6d 53 68 6f | 72 74 3a 20 74 68 65 53 |ParamSho|rt: theS|
|00000620| 68 6f 72 74 20 70 74 72 | 20 69 73 20 6e 69 6c 29 |hort ptr| is nil)|
|00000630| 41 45 47 65 74 50 61 72 | 61 6d 53 68 6f 72 74 3a |AEGetPar|amShort:|
|00000640| 20 74 68 65 41 20 70 a9 | 6c 65 45 76 65 6e 74 20 | theA p.|leEvent |
|00000650| 70 74 72 20 69 73 20 6e | 69 6c 26 41 45 47 65 74 |ptr is n|il&AEGet|
|00000660| 50 61 72 61 6d 53 68 6f | 72 74 3a 20 74 65 6d 70 |ParamSho|rt: temp|
|00000670| 42 75 20 66 b1 65 72 20 | 70 74 72 20 69 73 20 6e |Bu f.er |ptr is n|
|00000680| 00 00 00 ca 54 68 69 73 | 20 69 73 20 61 20 76 65 |....This| is a ve|
|00000690| 72 79 20 62 6f 72 69 6e | 67 20 74 65 73 74 20 73 |ry borin|g test s|
|000006a0| 63 72 69 70 74 20 66 6f | 72 20 74 65 73 74 69 6e |cript fo|r testin|
|000006b0| 67 20 74 68 65 20 72 65 | 73 75 6c 74 73 20 6f 66 |g the re|sults of|
|000006c0| 20 61 20 43 47 49 20 61 | 70 70 6c 69 63 61 74 69 | a CGI a|pplicati|
|000006d0| 6f 6e 20 74 68 61 74 20 | 68 61 73 20 47 72 61 6e |on that |has Gran|
|000006e0| 74 27 73 20 27 61 65 74 | 65 27 20 69 6e 20 69 74 |t's 'aet|e' in it|
|000006f0| 2e 20 49 27 6d 20 73 75 | 72 65 20 79 6f 75 20 63 |. I'm su|re you c|
|00000700| 61 6e 20 63 6f 6d 65 20 | 75 70 20 77 69 74 68 20 |an come |up with |
|00000710| 73 6f 6d 65 74 68 69 6e | 67 20 62 65 74 74 65 72 |somethin|g better|
|00000720| 2e 0d 68 74 74 70 3a 2f | 2f 61 72 70 70 2e 63 61 |..http:/|/arpp.ca|
|00000730| 72 6c 65 74 6f 6e 2e 63 | 61 2f 67 72 61 6e 74 2f |rleton.c|a/grant/|
|00000740| 6d 61 63 2f 67 72 61 6e | 74 73 63 67 69 2f 00 00 |mac/gran|tscgi/..|
|00000750| 00 2a 00 02 00 00 00 00 | 00 0e 00 0a 00 10 00 00 |.*......|........|
|00000760| 00 0c 00 00 00 00 00 00 | 00 00 00 9e 00 0b 00 09 |........|........|
|00000770| 00 04 00 00 00 09 00 00 | 00 00 7f ff 00 00 00 14 |........|........|
|00000780| 00 69 00 82 01 90 02 61 | 00 28 00 02 01 dd 02 5d |.i.....a|.(.....]|
|00000790| 00 00 00 00 00 00 01 00 | 00 00 02 14 00 00 01 14 |........|........|
|000007a0| 00 00 00 5a 00 ca 40 e8 | 26 32 00 00 00 1c 00 5a |...Z..@.|&2.....Z|
|000007b0| 00 02 54 45 58 54 00 00 | 00 1a 73 74 79 6c 00 00 |..TEXT..|..styl..|
|000007c0| 00 26 57 50 6f 73 00 00 | 00 32 04 68 ff ff 00 00 |.&WPos..|.2.h....|
|000007d0| 00 00 00 ca 39 1c 04 68 | ff ff 00 00 00 ce 00 ca |....9..h|........|
|000007e0| 39 44 00 80 ff ff 00 00 | 00 fc 00 ca 38 f4 00 00 |9D......|....8...|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+